package cn.zy.amyan.core.data;

import java.util.Objects;

/**
 * @author 子言
 * @date 2024/5/5 下午 15:07
 */
public class ProductInfo {
	/**
	 * 服务注册时间
	 * @author 子言
	 **/
	Long registerTime;
	/**
	 * 注册服务名
	 * @author 子言
	 **/
	private String serverName;
	/**
	 * 服务ip
	 * @author 子言
	 **/
	private String host;
	/**
	 * 服务端口
	 * @author 子言
	 **/
	private int port;

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public Long getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Long registerTime) {
		this.registerTime = registerTime;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}
		ProductInfo that = (ProductInfo) o;
		return port == that.port && Objects.equals(host, that.host);
	}

	@Override
	public int hashCode() {
		return Objects.hash(host, port);
	}
}
